package com.tiger.cloud.model.rejection;

import io.swagger.annotations.ApiModelProperty;

import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tiger.cloud.common.mybatis.TigerBaseEntity;
import com.tiger.cloud.model.crm.UserCompanyInfo;
import com.tiger.cloud.model.crm.UserInfo;
import com.tiger.cloud.util.URLUtils;
/**
 * 
 * crm_rejection-接单/甩单
 *
 */
public class Rejection extends TigerBaseEntity{

	private static final long serialVersionUID = 1L;
    
	/**
	 * 如果甩单给企业则为企业用户user_id
	 */
	@ApiModelProperty(value = "如果甩单给企业则为企业用户user_id")
    private Long enterpriseId;
	
	/**
	 * 企业名称
	 */
	@ApiModelProperty(value = "企业名称")
	private String enterpriseName;
	
	/**
	 * 借款金额(元)
	 */
	@ApiModelProperty(value = "借款金额(元)")
    private Double amount;
	/**
	 * 
	 */
	@ApiModelProperty(value = "")
    private Long provinceId;
	/**
	 * 
	 */
	@ApiModelProperty(value = "")
    private Long cityId;
	/**
	 * 
	 */
	@ApiModelProperty(value = "")
    private Long areaId;
	/**
	 * 借款类型文字
	 */
	@ApiModelProperty(value = "借款类型文字")
    private String loanTypeTxt;
	private String attachment;
	/**
	 * 借款类型
	 */
	@ApiModelProperty(value = "借款类型")
    private String loanType;
	/**
	 * 混合附加信息
	 */
	@ApiModelProperty(value = "混合附加信息")
    private String extParams;
	/**
	 * 借款期限
	 */
	@ApiModelProperty(value = "借款期限")
    private String loanTerm;
	/**
	 * 发布人
	 */
	@ApiModelProperty(value = "发布人")
    private Long userId;
	/**
	 * 0:已经发布,1:撤销
	 */
	@ApiModelProperty(value = "0:已经发布,1:撤销")
    private Integer status;
	/**
	 * 发布区域文本
	 */
	@ApiModelProperty(value = "发布区域文本")
    private String resourceAreaTxt;
	/**
	 * 发布区域省ID
	 */
	@ApiModelProperty(value = "发布区域省ID")
    private Long resourceProvinceId;
	/**
	 * 发布区区ID
	 */
	@ApiModelProperty(value = "发布区区ID")
    private Long resourceAreaId;
	/**
	 * 发布区域市ID
	 */
	@ApiModelProperty(value = "发布区域市ID")
    private Long resourceCityId;
	/**
	 * 备注
	 */
	@ApiModelProperty(value = "备注")
    private String remark;
	/**
	 * 
	 */
	@ApiModelProperty(value = "")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")   
   	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") 
    private java.sql.Timestamp createTime;
	/**
	 * 被查看次数
	 */
	@ApiModelProperty(value = "被查看次数")
    private Integer viewCount;
    /**
     * 是否是同行 0:是 1:不是
     */
	private Boolean hasPeer;
	 /**
     * 是否匹配 0:是 1:不是
     */
	private Boolean hasMatch=true;
	
	private UserInfo user;
	private UserCompanyInfo userCompanyInfo;
	
    public UserCompanyInfo getUserCompanyInfo() {
		return userCompanyInfo;
	}

	public void setUserCompanyInfo(UserCompanyInfo userCompanyInfo) {
		this.userCompanyInfo = userCompanyInfo;
	}

	public Boolean getHasMatch() {
		return hasMatch;
	}

	public void setHasMatch(Boolean hasMatch) {
		this.hasMatch = hasMatch;
	}

	public Boolean getHasPeer() {
		return hasPeer;
	}

	public void setHasPeer(Boolean hasPeer) {
		this.hasPeer = hasPeer;
	}

	public Rejection(){
    
    }
    
    public UserInfo getUser() {
		return user;
	}

	public void setUser(UserInfo user) {
		this.user = user;
	}

	public String getEnterpriseName() {
		return enterpriseName;
	}

	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}

	public String getAttachment() {
		return attachment;
	}

	public void setAttachment(String attachment) {
		this.attachment = attachment;
	}

	public Long getEnterpriseId() {
		return enterpriseId;
	}

	public void setEnterpriseId(Long enterpriseId) {
		this.enterpriseId = enterpriseId;
	}

	public Double getAmount() {
        return this.amount;
    }
    
    public void setAmount(Double amount) {
        this.amount = amount;
    }
    public Long getProvinceId() {
        return this.provinceId;
    }
    
    public void setProvinceId(Long provinceId) {
        this.provinceId = provinceId;
    }
    public Long getCityId() {
        return this.cityId;
    }
    
    public void setCityId(Long cityId) {
        this.cityId = cityId;
    }
    public Long getAreaId() {
        return this.areaId;
    }
    
    public void setAreaId(Long areaId) {
        this.areaId = areaId;
    }
    public String getLoanTypeTxt() {
        return this.loanTypeTxt;
    }
    
    public void setLoanTypeTxt(String loanTypeTxt) {
        this.loanTypeTxt = loanTypeTxt;
    }
    public String getLoanType() {
        return this.loanType;
    }
    
    public void setLoanType(String loanType) {
        this.loanType = loanType;
    }
    public String getExtParams() {
        return this.extParams;
    }
    
    public void setExtParams(String extParams) {
    	if(extParams!=null){
    		this.extParams =URLUtils.decodeURL(StringEscapeUtils.unescapeHtml4(extParams));
    	}
    }
    public String getLoanTerm() {
        return this.loanTerm;
    }
    
    public void setLoanTerm(String loanTerm) {
        this.loanTerm = loanTerm;
    }
    public Long getUserId() {
        return this.userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Integer getStatus() {
        return this.status;
    }
    
    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getResourceAreaTxt() {
        return this.resourceAreaTxt;
    }
    
    public void setResourceAreaTxt(String resourceAreaTxt) {
        this.resourceAreaTxt = resourceAreaTxt;
    }
    public Long getResourceProvinceId() {
        return this.resourceProvinceId;
    }
    
    public void setResourceProvinceId(Long resourceProvinceId) {
        this.resourceProvinceId = resourceProvinceId;
    }
    public Long getResourceAreaId() {
        return this.resourceAreaId;
    }
    
    public void setResourceAreaId(Long resourceAreaId) {
        this.resourceAreaId = resourceAreaId;
    }
    public Long getResourceCityId() {
        return this.resourceCityId;
    }
    
    public void setResourceCityId(Long resourceCityId) {
        this.resourceCityId = resourceCityId;
    }
    public String getRemark() {
        return this.remark;
    }
    
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public java.sql.Timestamp getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(java.sql.Timestamp createTime) {
        this.createTime = createTime;
    }
    public Integer getViewCount() {
        return this.viewCount;
    }
    
    public void setViewCount(Integer viewCount) {
        this.viewCount = viewCount;
    }
    
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}